//
//  CellFactory.m
//  OCUI3
//
//  Created by login on 15-6-30.
//  Copyright (c) 2015年 login. All rights reserved.
//

#import "CellFactory.h"
#import "ButtonCell.h"
@implementation CellFactory

+ (BaseTableViewCell *)getCellType:(NSString *)cellType andCellStyle:(UITableViewCellStyle)cellStyle withCellIdentifier:(NSString *)cellIdentifier
{
    id cell = [[NSClassFromString(cellType) alloc]init];
    
    if ([cell isKindOfClass:[BaseTableViewCell class]]) {
        return cell;
    }
    return nil;
}

+ (CGFloat)getCellHeight:(NSString *)cellType
{
    id cell = [[NSClassFromString(cellType) alloc]init];
    
    if ([cell isKindOfClass:[BaseTableViewCell class]]) {
        CGFloat height = [cell getCellHeight];
        return height;
    }
    return 0;
}
@end

